home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 169 / 169.d81 / monkey match (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  11KB  |  388 lines

  1. 8 poke53371,0
  2. 10 poke53280,.:poke53281,.:print"":gosub2860:gosub1680
  3. 20 rem -- main screen --
  4. 30 poke53281,.:poke53280,6:print"[147]"
  5. 40 printtab(30)"[149][216][217][218][219]":printtab(30)"[129][220][221][255][223]"
  6. 50 printtab(30)"[160][161][162][163]":printtab(30)"[164][165][166][167]"
  7. 60 printtab(27)" player 1 ":printtab(26)"score : 0000"
  8. 70 printtab(30)"[150][200][201][202][203]":printtab(30)"[204][205][206][207]"
  9. 80 printtab(30)"[208][209][210][211]":printtab(30)"[155][212][213][214][215]"
  10. 90 printtab(27)" player 2 ":printtab(26)"score : 0000"
  11. 100 printtab(25)"              "
  12. 110 print"  letter    animal  "
  13. 120 printtab(25)"[152]abcdefghijklm"
  14. 130 print" help  credits  quit ";
  15. 140 print"[146][152]nopqrstuvwxyz"
  16. 150 fori=1to30:sysml+36,i,27,14:next
  17. 160 rem -- setup --
  18. 170 sysml+39,224:sysml+30,11,28,10,14,160,20
  19. 180 poke214,11:print:printtab(13)"[156]monkey mixing!"
  20. 190 pokev+2,35:pl=0:mv=0:sc(1)=0:sc(2)=0
  21. 200 fori=.to1:forj=1to15:a%(i*15+j)=j:next:next
  22. 210 fori=1to30:f=int(rnd(1)*30+1):x=a%(i):a%(i)=a%(f):a%(f)=x:next
  23. 220 fori=.to25:poke832+i,.:next
  24. 230 an$=a$(rnd(1)*a%):tb=32-len(an$)/2
  25. 240 sysml+42,224
  26. 250 poke214,19:print:printtab(tb);
  27. 260 fori=1tolen(an$)
  28. 270 ifmid$(an$,i,1)=" "thenprint" ";:goto290
  29. 280 print"[154]]";
  30. 290 next
  31. 300 rem -- begin --
  32. 310 sysml+12,27,6," player 1 "
  33. 320 sysml+12,27,15," player 2 "
  34. 330 pl=pl+1:ifpl>2thenpl=1
  35. 340 poke214,(pl-1)*9+5:print:printtab(27)"[156] player"pl"[157] "
  36. 350 rem -- main --
  37. 358 sysml+21,xa,ya
  38. 360 sysml+9:ifcr%then390
  39. 362 sysml+60,"[145][157]":ifi%=0then360
  40. 364 ifi%=1thenya=ya-1:ifya<0thenya=0
  41. 365 ifi%=2thenya=ya+1:ifya>24thenya=24
  42. 366 ifi%=3thenxa=xa-1:ifxa<0thenxa=0
  43. 367 ifi%=4thenxa=xa+1:ifxa>39thenxa=39
  44. 370 goto358
  45. 380 rem -- display 1st animal --
  46. 390 ifcr%>30then690
  47. 400 ifa%(cr%)=0orcr%=mvthen360
  48. 410 ifmvthen480
  49. 420 sysml+36,cr%,32,0
  50. 430 f=a%(cr%):sysml+129,f2+(f-1)*72,f2+(f-1)*72+72,f1+1792
  51. 440 poke214,int((cr%-1)/6)*4:print
  52. 450 poke646,cl(f):f=peek((cr%-1)*4+rl):printtab(f)a1$
  53. 460 gosub2510:mv=cr%:goto360
  54. 470 rem -- display 2nd animal --
  55. 480 sysml+36,cr%,32,0
  56. 490 f=a%(cr%):sysml+129,f2+(f-1)*72,f2+(f-1)*72+72,f1+1864
  57. 500 poke214,int((cr%-1)/6)*4:print
  58. 510 poke646,cl(f):f=peek((cr%-1)*4+rl):printtab(f)a2$
  59. 520 gosub2510:poke53370,0:forde=.to500:next:poke53371,0
  60. 530 ifa%(mv)=a%(cr%)then580
  61. 540 rem -- no match --
  62. 550 gosub2640:sysml+36,mv,27,14:sysml+36,cr%,27,14
  63. 560 mv=0:goto310
  64. 570 rem -- match --
  65. 580 gosub2550:sc(pl)=sc(pl)+100:gosub630
  66. 590 a%(cr%)=0:a%(mv)=0
  67. 600 sysml+36,mv,32,0:sysml+36,cr%,32,0
  68. 610 mv=0:goto360
  69. 620 rem -- update score --
  70. 630 a$=str$(sc(pl)):a$=right$(a$,len(a$)-1)
  71. 640 poke214,(pl-1)*9+7:print
  72. 650 printtab(34)"0000[145]"
  73. 660 printtab(38-len(a$))a$
  74. 670 return
  75. 680 rem -- options --
  76. 690 sysml+36,cr%,255,1
  77. 700 oncr%-30goto720,890,1880,1270,1560
  78. 710 rem -- guess letter --
  79. 720 t=0:ifsc(pl)=0ormvthengosub2600:sysml+36,cr%,255,6:goto360
  80. 730 gosub2510:sysml+36,cr%,255,6
  81. 740 sysml+12,25,18,"[156]what letter?  ":f=49910
  82. 742 poke198,0
  83. 750 x=peek(f)and127:t=t+1and15:pokef,x-(t<8)*128
  84. 760 geta$:ifa$<"a"ora$>"z"then750
  85. 770 print"[146][157]"a$
  86. 780 printtab(25)"[145]              "
  87. 790 ifpeek(832+asc(a$)-65)thengosub2600:goto360
  88. 800 fl=0:fori=1tolen(an$)
  89. 810 ifa$=mid$(an$,i,1)thenprinttab(tb);:printspc(i-1)""a$"[145]":gosub2510:fl=1
  90. 820 next
  91. 830 f=asc(a$)-64:poke831+f,1
  92. 840 poke214,21-(f>13):print
  93. 850 f=(f>13)*13+f:printtab(24+f)""a$
  94. 860 sc(pl)=sc(pl)-25:gosub630:iffl=0thengosub2640:goto310
  95. 870 goto360
  96. 880 rem -- guess animal --
  97. 890 ifsc(pl)<50ormvthengosub2600:sysml+36,cr%,255,6:goto360
  98. 900 gosub2510:sysml+36,cr%,255,6
  99. 910 sysml+39,224
  100. 920 sysml+12,26,18,"[156]what animal?[136]"
  101. 930 t=0:x1=49912+tb:x2=x1+len(an$)-1:f=x1
  102. 940 x=peek(f)and127:t=t+1and15:pokef,x-(t<8)*128
  103. 950 geta$:ifa$=""then940
  104. 960 ifa$=chr$(13)thenpokef,peek(f)and127:goto1090
  105. 970 ifa$=chr$(20)thenpokef,32:gosub1060:goto940
  106. 980 ifa$=""thenpokef,peek(f)and127:goto1030
  107. 990 ifa$="[157]"thenpokef,peek(f)and127:gosub1060:goto940
  108. 1000 ifa$=" "thenpokef,32:goto1030
  109. 1010 ifa$<"a"ora$>"z"then950
  110. 1020 pokef,asc(a$)-64
  111. 1030 f=f+1:iff>x2thenf=x2
  112. 1040 t=0:goto940
  113. 1050 rem -- delete/crsr left --
  114. 1060 f=f-1:iff<x1thenf=x1
  115. 1070 t=0:return
  116. 1080 rem -- check answer --
  117. 1090 print"[145]            "
  118. 1100 f=0:x1=49911+tb:fori=1tolen(an$)
  119. 1110 x=peek(x1+i):ifx=32andmid$(an$,i,1)=" "then1130
  120. 1120 ifasc(mid$(an$,i,1))<>x+64thenf=1
  121. 1130 next
  122. 1140 iff=1thengosub2640:sysml+42,224:sc(pl)=sc(pl)-50:gosub630:goto310
  123. 1150 rem -- winner --
  124. 1160 gosub2710:poke214,(pl-1)*9+5:print
  125. 1170 fori=.to1
  126. 1180 printtab(27)" [156] winner [146] "
  127. 1190 gosub2510:forde=.to300:next
  128. 1200 printtab(27)"[145] player"pl"[157] [145]"
  129. 1210 gosub2510:forde=.to300:next
  130. 1220 next
  131. 1230 printtab(27)"  winner [146] "
  132. 1240 gosub2510:forde=.to300:next
  133. 1250 goto1460
  134. 1260 rem -- credits --
  135. 1270 gosub2510:sysml+36,cr%,255,6
  136. 1280 sysml+39,224
  137. 1290 sysml+30,5,34,8,16,160,19
  138. 1300 poke214,9:print
  139. 1310 printtab(7)"[159]program, design & graphics"
  140. 1320 printtab(12)"pineapple monkey"
  141. 1330 printtab(7)"mr mouse jr  sound effects"
  142. 1340 printtab(8)"lee novak    ls programs"
  143. 1350 sysml+9:ifl2%=0then1350
  144. 1360 sysml+42,224:goto360
  145. 1370 rem -- box 1 --
  146. 1380 pokev+10,32:pokev+11,66:pokev+12,67:pokev+13,64:pokev+14,65
  147. 1390 pokev+15,68:pokev+16,69:pokev+17,70:pokev+18,71
  148. 1400 return
  149. 1410 rem -- box 2 --
  150. 1420 pokev+10,160:pokev+11,105:pokev+12,111:pokev+13,104:pokev+14,110
  151. 1430 pokev+15,106:pokev+16,107:pokev+17,108:pokev+18,109
  152. 1440 return
  153. 1450 rem -- play again? --
  154. 1460 pokev+2,39:sysml+39,224
  155. 1470 sysml+30,5,34,8,16,160,24
  156. 1480 poke214,9:print
  157. 1490 printtab(7)"[129]do you want to play again?"
  158. 1500 sysml+30,11,15,12,14,160,26:sysml+30,24,28,12,14,160,26
  159. 1510 printtab(13)"[150]y[129]or[150]n"
  160. 1520 sysml+9:sysml+60,"yn":if(cr%<38)and(i%=0)then1520
  161. 1530 gosub2510:if(cr%=38)or(i%=1)then30
  162. 1540 poke53269,.:sysml+126,4,24:sysml+3:goto40000
  163. 1550 rem -- quit --
  164. 1560 gosub2510:sysml+36,cr%,255,6
  165. 1570 pokev+2,37:sysml+39,224
  166. 1580 sysml+30,8,31,8,16,160,26
  167. 1590 poke214,9:print
  168. 1600 printtab(10)"[150]do you want to quit?"
  169. 1610 sysml+30,12,16,12,14,160,20:sysml+30,23,27,12,14,160,20
  170. 1620 printtab(14)"[156]y[150]or[156]n"
  171. 1630 sysml+9:sysml+60,"yn":if(cr%<36)and(i%=0)then1630
  172. 1640 gosub2510
  173. 1650 sysml+42,224:if(cr%=36)or(i%=1)then1460
  174. 1660 pokev+2,35:goto360
  175. 1670 rem -- title screen --
  176. 1680 print"[147]":poke53265,11:gosub1380
  177. 1690 sysml+126,192,240
  178. 1700 sysml+30,0,39,0,24,27,14
  179. 1710 sysml+30,3,38,4,22,27,6
  180. 1720 sysml+30,2,37,3,21,27,31
  181. 1730 poke214,4:print
  182. 1740 printtab(5)"[198][197][146]loadstar proudly[198][197]"
  183. 1750 printtab(4)"[217]  [255]"tab(32)"[217]  [255]"
  184. 1760 printtab(5)"[255][217][146]presents[255][217]"
  185. 1770 print"[158][192][193][194][195][200][196][192][197][194][192][198][199][195][200][201][192][194][192][193][194][195][200][196][202] [203][195][200][201][192][194]"
  186. 1780 print"[150][204][213][205][204][205][204] [205][204] [207][204][208][215][209][216][204][213][205][204][210][205] [204][204][211][205]"
  187. 1790 print"[129][212][214][215][219][216][212][217][214][212][217][218][215][219][220][221][212][214][212][214][221][215][219][220][212][214]"
  188. 1800 printtab(9)"[156]a game for two players"
  189. 1810 printtab(10)"on the commodore 64!"
  190. 1820 printtab(4)"(c) 1998 by j&f publishing, inc."
  191. 1830 gosub2710:poke53265,27:poke53280,6
  192. 1840 sysml+9:ifl2%=0then1840
  193. 1850 gosub2510:gosub1420
  194. 1860 sysml+6,50432:return
  195. 1870 rem -- directions --
  196. 1880 gosub2510:sysml+36,cr%,255,6
  197. 1890 sysml+39,224:gosub1380
  198. 1900 sysml+129,f2+1792,f2+2048,f1+1792
  199. 1910 poke53281,.:poke53280,.:print"[147]"
  200. 1920 sysml+30,0,39,0,24,30,6
  201. 1930 sysml+30,1,38,1,23,30,31
  202. 1940 printtab(15)"[159]directions"
  203. 1950 print"[149][216][217][218][219]"
  204. 1960 print"[129][220][221][255][223][156]hello, it is so nice to meet"
  205. 1970 print"[129][160][161][162][163][156]you. i am pineapple monkey,"
  206. 1980 print"[129][160][161][162][163][146][156]and i would like to welcome"
  207. 1990 print"[164][165][166][167][146][156]you to my latest game,"
  208. 2000 print"[168][169][170][171][146][156]monkey match. it is a game"
  209. 2010 print"[172][173][174][175][146][156]for two players, so i hope"
  210. 2020 pri